package org.keyyond.ms.commonservice.service.impl;

import java.util.List;

import org.keyyond.ms.commonservice.dao.SDBDUserRoleDao;
import org.keyyond.ms.commonservice.model.SDBDUserRole;
import org.keyyond.ms.commonservice.service.SDBDUserRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SDBDUserRoleServiceImpl implements SDBDUserRoleService{
	
	@Autowired
	private SDBDUserRoleDao userRoleDao;

	@Override
	public int deleteUserRolesByUserid(String seqno) {
		// TODO Auto-generated method stub
		return userRoleDao.deleteUserRolesByUserid(seqno);
	}

	@Override
	public int addUserRole(SDBDUserRole usereRole) {
		// TODO Auto-generated method stub
		return userRoleDao.addUserRole(usereRole);
	}

	@Override
	public List<SDBDUserRole> getRolesByUserid(String userid) {
		// TODO Auto-generated method stub
		SDBDUserRole fur = new SDBDUserRole();
		fur.setUserid(userid);
		return userRoleDao.getRolesByUserid(fur);
	}

}
